<?php include 'login/Restrito.php';?>
<script language="JavaScript" type="text/javascript">
   
	function caractereTelefone(campoTel){
              var telefone = campoTel.value;
              if (telefone.length == 3){
                  telefone = telefone + ')';
                  document.forms[0].fone.value = telefone;
      				return true;              
              }
              if (telefone.length == 8){
                  telefone = telefone + '-';
                  document.forms[0].fone.value = telefone;
                  return true;
              }
			  
         }
	function mascaraCpf(campoCpf){
        var cpf = campoCpf.value;
        if (cpf.length == 3){
            cpf = cpf + '.';
            document.forms[0].cpfU.value = cpf;
				return true;              
        }
        if (cpf.length == 7){
            cpf = cpf + '.';
            document.forms[0].cpfU.value = cpf;
            return true;
        }
		  if (cpf.length == 11){
            cpf = cpf + '-';
            document.forms[0].cpfU.value = cpf;
            return true;
        }
   }
	
</script>
<div id="conteudo">
	
	<div align="center">
    
    <form action="medicos/MedicoCadastrar.php" method="post">
    <h3 align="center">Cadastrar Médico</h3>
  	<hr color="#0066FF" size="3px">
    <br />
    <div align="center" style="min-height: 350px; width:auto">
      <table width="700" border="0" align="center">
      
      <tr>
            <td width="100" align="left"><div align="left">Nome</div></td>
            <td width="600"><input name="nome" type="text" size="70" /></td>
          </tr>
          <tr>
          	<td align="left">CRM</td>
            <td><input type="text" name="crm" maxlength="5"></td>
          </tr>
          <tr>
            <td align="left">CPF</td>
            <td><input type="text" id="cpf" name="cpfU" OnKeyUp="mascaraCpf(this);" maxlength="14"/><font size="2" color="#555"> Ex: 000.000.000-00 </font> </td>
          </tr>
          <tr>
            <td align="left">Especialidade</td>
            <td><input type="text" name="especialidade" size="70" /></td>
          </tr>
          <tr>
            <td align="left">Telefone</td>
            <td><input type="text" id="tel" name="fone" OnKeyUp="caractereTelefone(this);" maxlength="13" value="(" /><font size="2" color="#555"> Ex: (XX)0000-0000 </font> </td>
          </tr>
          <tr>
            <td align="left">Plantão</td>
            <td><input type="radio" name="plantao" value="1" />Sim <br><input type="radio" name="plantao" value="0">Não</td>
          </tr>
          
          <tr>
            <td align="left">&nbsp;</td>
            <td><input type="submit" value="Cadastrar" name="enviar" class="botao"/> </td>
          </tr>
        </table>
        </div>
      
    </form>
    
    </div>
</div>
